package com.atguigu.common.exception;

/**
 * 10: 通用异常
 * 11: 商品模块
 * 12: 订单模块
 * 13: 购物车模块
 * 14: 物流模块
 * 15: 用户模块
 */
public enum BizCodeEnum {
    UNKNOWN_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "参数格式校验失败"),
    SMS_CODE_EXCEPTION(10002, "验证码获取频率过高"),
    PHONE_EXIST_EXCEPTION(15003, "手机号已存在"),
    USERNAME_EXIST_EXCEPTION(15004, "用户名已存在"),
    LOGINCAT_OR_PASSWORD_INVALID_EXCEPTION(15005, "用户名或密码错误"),
    SOCIAL_LOGIN_INVALID(15006, "社交登录异常");

    private final Integer code;
    private final String msg;
    BizCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
